package com.zty.DO;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * @Author ZTY
 * @Description 要存储的元数据对象类型
 * @Date 22:53 2023-12-23
 **/

@Data
@Document("meta")
@Accessors(chain = true)
public class MetaFile {

    //  文件名作用类似id，作为全局唯一标记符
    @Id
    private String filename;
    private String extension;
    private Long filesize;
    private String bucketName;
    //  分片数
    private Integer totalChunk;
    //  具体分片
    private List<FileChunkMeta> chunks;
    //  判断文件是否上传完成的标记
    private Boolean completed = false;
}
